import request from '@/utils/request'
import formurlencoded from 'form-urlencoded'


//获取pc首页相关图片
export function fetchPcImageList(query) {
  return request({
    url: '/admin/pcindex/image/list',
    method: 'get',
    params: query
  })
}
//新增首页相关图片
export function createIndexImage(data) {
  return request({
    url: '/admin/pcindex/image/create',
    method: 'post',
    data: formurlencoded(data)
  })
}
//跳转编辑首页相关图片
export function toUpdateIndexImage(query) {
  return request({
    url: '/admin/pcindex/image/edit',
    method: 'get',
    params: query
  })
}

//更新首页相关图片
export function updateIndexImage(data) {
  return request({
    url: '/admin/pcindex/image/update',
    method: 'post',
    data: formurlencoded(data)
  })
}
//预使用
export function preImage(data) {
  return request({
    url: '/admin/pcindex/image/pre',
    method: 'post',
    data: formurlencoded(data)
  })
}

//删除
export function deleteImage(data) {
  return request({
    url: '/admin/pcindex/image/delete',
    method: 'post',
    data: formurlencoded(data)
  })
}
//启用
export function upImage(data) {
  return request({
    url: '/admin/pcindex/image/up',
    method: 'post',
    data: formurlencoded(data)
  })
}

//停用
export function downImage(data) {
  return request({
    url: '/admin/pcindex/image/down',
    method: 'post',
    data: formurlencoded(data)
  })
}


//获取pc首页轮播图
export function fetchPcBannerList(query) {
  return request({
    url: '/admin/pcindex/banner/list',
    method: 'get',
    params: query
  })
}
//新增首页轮播图
export function createIndexBanner(data) {
  return request({
    url: '/admin/pcindex/banner/create',
    method: 'post',
    data: formurlencoded(data)
  })
}
//跳转编辑首页轮播图
export function toUpdateIndexBanner(query) {
  return request({
    url: '/admin/pcindex/banner/edit',
    method: 'get',
    params: query
  })
}

//更新首页轮播图
export function updateIndexBanner(data) {
  return request({
    url: '/admin/pcindex/banner/update',
    method: 'post',
    data: formurlencoded(data)
  })
}
//预使用
export function preBanner(data) {
  return request({
    url: '/admin/pcindex/banner/pre',
    method: 'post',
    data: formurlencoded(data)
  })
}

//删除
export function deleteBanner(data) {
  return request({
    url: '/admin/pcindex/banner/delete',
    method: 'post',
    data: formurlencoded(data)
  })
}
//启用
export function upBanner(data) {
  return request({
    url: '/admin/pcindex/banner/up',
    method: 'post',
    data: formurlencoded(data)
  })
}

//停用
export function downBanner(data) {
  return request({
    url: '/admin/pcindex/banner/down',
    method: 'post',
    data: formurlencoded(data)
  })
}


//获取pc多惠部落
export function fetchPcRecommendList(query) {
  return request({
    url: '/admin/pcindex/recommend/list',
    method: 'get',
    params: query
  })
}
//新增pc多惠部落
export function createIndexRecommend(data) {
  return request({
    url: '/admin/pcindex/recommend/create',
    method: 'post',
    data: formurlencoded(data)
  })
}
//跳转编辑pc多惠部落
export function toUpdateIndexRecommend(query) {
  return request({
    url: '/admin/pcindex/recommend/edit',
    method: 'get',
    params: query
  })
}

//更新pc多惠部落
export function updateIndexRecommend(data) {
  return request({
    url: '/admin/pcindex/recommend/update',
    method: 'post',
    data: formurlencoded(data)
  })
}

//预使用
export function preRecommend(data) {
  return request({
    url: '/admin/pcindex/recommend/pre',
    method: 'post',
    data: formurlencoded(data)
  })
}

//删除
export function deleteRecommend(data) {
  return request({
    url: '/admin/pcindex/recommend/delete',
    method: 'post',
    data: formurlencoded(data)
  })
}
//启用
export function upRecommend(data) {
  return request({
    url: '/admin/pcindex/recommend/up',
    method: 'post',
    data: formurlencoded(data)
  })
}

//停用
export function downRecommend(data) {
  return request({
    url: '/admin/pcindex/recommend/down',
    method: 'post',
    data: formurlencoded(data)
  })
}








//获取pc楼层列表
export function fetchPcFloorList(query) {
  return request({
    url: '/admin/pcindex/floor/list',
    method: 'get',
    params: query
  })
}

// 新增楼层
export function createFloor(data) {
  return request({
    url: '/admin/pcindex/floor/create',
    method: 'post',
    data: formurlencoded(data)
  })
}

// 编辑楼层
export function editFloor(query) {
  return request({
    url: '/admin/pcindex/floor/edit',
    method: 'get',
    params: query
  })
}

// 编辑楼层-提交信息
export function updateFloor(data) {
  return request({
    url: '/admin/pcindex/floor/update',
    method: 'post',
    data: formurlencoded(data)
  })
}

//预使用
export function pre(data) {
  return request({
    url: '/admin/pcindex/floor/pre',
    method: 'post',
    data: formurlencoded(data)
  })
}

//删除
export function deleteFloor(data) {
  return request({
    url: '/admin/pcindex/floor/delete',
    method: 'post',
    data: formurlencoded(data)
  })
}
//启用
export function upFloor(data) {
  return request({
    url: '/admin/pcindex/floor/up',
    method: 'post',
    data: formurlencoded(data)
  })
}

//停用
export function downFloor(data) {
  return request({
    url: '/admin/pcindex/floor/down',
    method: 'post',
    data: formurlencoded(data)
  })
}

//跳转首页楼层分类列表页
export function toPcFloorClassList() {
  return request({
    url: '/admin/pcindex/floorclass',
    method: 'get'
  })
}

//获取pc楼层分类列表
export function fetchPcFloorClassList(query) {
  return request({
    url: '/admin/pcindex/floorclass/list',
    method: 'get',
    params: query
  })
}

//跳转新增楼层分类页
export function toAddPcFloorClassList() {
  return request({
    url: '/admin/pcindex/floorclass/add',
    method: 'get'
  })
}

// 新增楼层分类
export function createFloorClass(data) {
  return request({
    url: '/admin/pcindex/floorclass/create',
    method: 'post',
    data: formurlencoded(data)
  })
}

// 编辑楼层分类
export function editFloorClass(query) {
  return request({
    url: '/admin/pcindex/floorclass/edit',
    method: 'get',
    params: query
  })
}

// 编辑楼层分类-提交信息
export function updateFloorClass(data) {
  return request({
    url: '/admin/pcindex/floorclass/update',
    method: 'post',
    data: formurlencoded(data)
  })
}

//预使用
export function preClass(data) {
  return request({
    url: '/admin/pcindex/floorclass/pre',
    method: 'post',
    data: formurlencoded(data)
  })
}

//删除
export function deleteFloorClass(data) {
  return request({
    url: '/admin/pcindex/floorclass/delete',
    method: 'post',
    data: formurlencoded(data)
  })
}
//启用
export function upFloorClass(data) {
  return request({
    url: '/admin/pcindex/floorclass/up',
    method: 'post',
    data: formurlencoded(data)
  })
}

//停用
export function downFloorClass(data) {
  return request({
    url: '/admin/pcindex/floorclass/down',
    method: 'post',
    data: formurlencoded(data)
  })
}

//跳转首页楼层分类数据列表页
export function toPcFloorDataList() {
  return request({
    url: '/admin/pcindex/floordata',
    method: 'get'
  })
}

//获取pc楼层分类数据列表
export function fetchPcFloorDataList(query) {
  return request({
    url: '/admin/pcindex/floordata/list',
    method: 'get',
    params: query
  })
}

//跳转新增楼层分类数据页
export function toAddPcFloorData() {
  return request({
    url: '/admin/pcindex/floordata/add',
    method: 'get'
  })
}

// 新增楼层分类数据
export function createFloorData(data) {
  return request({
    url: '/admin/pcindex/floordata/create',
    method: 'post',
    data: formurlencoded(data)
  })
}
//选择商品弹出框
export function getProductsDialog(query) {
  return request({
    url: '/admin/product/list',
    method: 'get',
    params: query
  })
}
// 编辑楼层分类数据
export function editFloorData(query) {
  return request({
    url: '/admin/pcindex/floordata/edit',
    method: 'get',
    params: query
  })
}
// 删除楼层分类数据
export function delFloorData(data) {
  return request({
    url: '/admin/pcindex/floordata/delete',
    method: 'post',
    data: formurlencoded(data)
  })
}

// 编辑楼层分类数据-提交信息
export function updateFloorData(data) {
  return request({
    url: '/admin/pcindex/floordata/update',
    method: 'post',
    data: formurlencoded(data)
  })
}












//跳转首页楼层碎屑列表页
export function toPcFloorPatchList() {
  return request({
    url: '/admin/pcindex/floorpatch',
    method: 'get'
  })
}

//获取pc楼层碎屑列表
export function fetchPcFloorPatchList(query) {
  return request({
    url: '/admin/pcindex/floorpatch/list',
    method: 'get',
    params: query
  })
}

//跳转新增楼层碎屑页
export function toAddPcFloorPatchList() {
  return request({
    url: '/admin/pcindex/floorpatch/add',
    method: 'get'
  })
}
//新增楼层碎屑
export function createFloorPatch(data) {
  return request({
    url: '/admin/pcindex/floorpatch/create',
    method: 'post',
    data: formurlencoded(data)
  })
}

// 编辑楼层碎屑
export function editFloorPatch(query) {
  return request({
    url: '/admin/pcindex/floorpatch/edit',
    method: 'get',
    params: query
  })
}

// 编辑楼层碎屑-提交信息
export function updateFloorPatch(data) {
  return request({
    url: '/admin/pcindex/floorpatch/update',
    method: 'post',
    data: formurlencoded(data)
  })
}

//预使用
export function prePatch(data) {
  return request({
    url: '/admin/pcindex/floorpatch/pre',
    method: 'post',
    data: formurlencoded(data)
  })
}

//删除
export function deleteFloorPatch(data) {
  return request({
    url: '/admin/pcindex/floorpatch/delete',
    method: 'post',
    data: formurlencoded(data)
  })
}
//启用
export function upFloorPatch(data) {
  return request({
    url: '/admin/pcindex/floorpatch/up',
    method: 'post',
    data: formurlencoded(data)
  })
}

//停用
export function downFloorPatch(data) {
  return request({
    url: '/admin/pcindex/floorpatch/down',
    method: 'post',
    data: formurlencoded(data)
  })
}
